<template>
    <view>
      
      <van-nav-bar
      title="晋升申请" 
      right-text="申请记录"
      fixed
      placeholder 
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    /> 
      <view style="margin-top: 20rpx"></view>
    <van-form @submit="confirmRemoke">
      <van-cell-group inset>
        <van-field
          v-model="formData.type"
          autosize
          label="原单位"
          placeholder="请选择原单位"
          required
          :rules="[{ required: true, message: '请选择请原单位' }]"
          error-message-align="left"
          clearable
        />
        <van-field
          v-model="formData.type"
          autosize
          label="原部门"
          placeholder="请选择原部门"
          required
          :rules="[{ required: true, message: '请选择请原部门' }]"
          error-message-align="left"
          clearable
        />
        <van-field
          v-model="formData.type"
          autosize
          label="原级别"
          placeholder="请选择原级别"
          required
          :rules="[{ required: true, message: '请选择请原级别' }]"
          error-message-align="left"
          clearable
        />
      </van-cell-group>
      <view style="margin-top: 20rpx"></view>
      <van-cell-group inset>
        <van-field
          v-model="formData.type"
          autosize
          label="新单位"
          placeholder="请选择新单位"
          required
          :rules="[{ required: true, message: '请选择请新单位' }]"
          error-message-align="left"
          clearable
        />
        <van-field
          v-model="formData.type"
          autosize
          label="新部门"
          placeholder="请选择新部门"
          required
          :rules="[{ required: true, message: '请选择请新部门' }]"
          error-message-align="left"
          clearable
        />
        <van-field
          v-model="formData.type"
          autosize
          label="新职级"
          placeholder="请选择新职级"
          required
          :rules="[{ required: true, message: '请选择请新职级' }]"
          error-message-align="left"
          clearable
        />
      </van-cell-group>
      <view style="margin-top: 20rpx"></view>
      
      <van-cell-group inset>
        <van-field
          v-model="formData.reason"
          autosize
          label="调动原因"
          placeholder="请输入调动原因"
          type="textarea"
          rows="3"
          required 
          error-message-align="left"
          clearable
        />
      </van-cell-group>
      <view style="margin-top: 20rpx"></view>
      <van-cell-group inset>
        <van-field
          v-model="formData.type"
          autosize
          label="说明附件"
          placeholder="请选择请假类型"
          required
          :rules="[{ required: true, message: '请选择请假类型' }]"
          error-message-align="left"
          clearable
        />
      </van-cell-group>
      <view style="margin-top: 20rpx"></view>
      <van-cell-group inset>
        <van-field
          v-model="formData.reason"
          autosize
          label="备注"
          placeholder="请输入备注"
          type="textarea"
          rows="3" 
          error-message-align="left"
          clearable
        />
      </van-cell-group>
    </van-form>

    <view class="btn">确定</view>
    <view style="height: 100rpx;"></view>
    </view>
  </template>
  <script setup> 
  import { onLoad } from "@dcloudio/uni-app"; 
  
    const formData = ref({});
    const active = ref(0);
  onLoad((options) => {
     
  });
  onShow(() => {});
  const onClickLeft=()=>{
     uni.navigateBack({
      delta:1
     })
  }
  const onClickRight=()=>{
    uni.navigateTo({
      url:'/pages/promotion/record'
    })
  }
  </script>
 <style lang="scss" scoped>
 .card {
   background: #fff;
 }
 .btn {
   width: 93%;
   height: 88rpx;
   border-radius: 10rpx;
   text-align: center;
   line-height: 88rpx;
   background: #1158bf;
   color: #fff;
   margin: 0 auto;
   margin-top: 100rpx;
 }
 </style>
  